#ifndef __COMPRESS_GPU_H__
#define __COMPRESS_GPU_H__
#include<thrust/scan.h>
#include<thrust/reduce.h>
#include<thrust/device_ptr.h>
#include<thrust/device_vector.h>
#include <thrust/iterator/constant_iterator.h>
#include <math.h>
#include <cutil_inline.h>
#include <thrust/copy.h>
#include <thrust/gather.h>
#include <thrust/sort.h>
#include <thrust/binary_search.h>

#include <iostream>
#include <iterator>

#include <mian_util.h>
#include "result.h"


void gpu_binary_encoding(uint8* data, uint32 dataSize, uint8* out);
void gpu_delta_encoding(uint32* data, uint32 dataSize);
void gpu_delta_decoding(uint32* data, uint32 dataSize);
void gpu_golomb_coding(uint32* d_data, uint32 dataSize, uint32* d_dataPos, uint8* d_out, uint32* outBitSize, uint32* M);
void gpu_golomb_coding(uint8* d_data, uint32 dataSize, uint32* d_dataPos, uint8* d_out, uint32* outBitSize, uint32* M);
void gpu_run_length_encoding(uint32* data, uint32 dataSize, uint32* out, uint32* out_len, uint32* outSize);
void gpu_run_length_decoding(uint32* data, uint32* data_len, uint32 dataSize, uint32* out, uint32* outSize);

//test
void gpu_binary_encoding_test(uint8* data, uint32 dataSize, uint8* out);
void gpu_delta_encoding_test(uint32* data, uint32 dataSize);
void gpu_golomb_coding_test(uint32* data, uint32 dataSize, uint8* out, uint32* outBitSize);
void gpu_golomb_coding_test(uint8* data, uint32 dataSize, uint8* out, uint32* outBitSize);



#endif

